import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from "../views/Login";
import AccountsManage from "../components/systemManage/AccountsManage";
import ConstantManage from "../components/systemManage/ConstantManage";
import DiagnoseManage from "../components/systemManage/DiagnoseManage";
import DoctorDutyManage from "../components/systemManage/DoctorDutyManage";
import OfficeManage from "../components/systemManage/OfficeManage";
import RegisterRank from "../components/systemManage/RegisterRank";
import UndrugFeeManage from "../components/systemManage/UndrugFeeManage";
import UserManage from "../components/systemManage/UserManage";
import DoctorDeal from "../components/doctorDeal/DoctorDeal";
import DrugstoreManage from "../components/drugstoreManage/DrugstoreManage";
import FinancialManage from "../components/financialManage/FinancialManage";
import RegisterFees from "@/components/registerFees/RegisterFees";
import SeeDoctor from "@/components/seeDoctor/SeeDoctor";


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    component:Login,
    meta:{
      hasChildren:false,
      title:'登陆首页'
    }
  },

  {
    path: '/home',
    name: 'Home',
    component: Home,
    meta:{
      hasChildren:false,
      title:'主页'
    }
  },

  {
    path: '/home1',
    name: 'Home',
    component: Home,
    meta: {
      title: '挂号收费',
      hasChildren: true
    },
    children:[
            {
              path: '/registerFees',
              name: 'RegisterFees',
              component: RegisterFees,
              meta: {
                title: '挂号收费',
              }
            }
      ]
  },

  {
    path: '/home2',
    name: 'Home',
    component: Home,
    meta: {
      title: '门诊医生',
      hasChildren: true
    },
    children:[
      {
        path: '/seeDoctor',
        name: 'SeeDoctor',
        component: SeeDoctor,
        meta: {
          title: '门诊医生',
        }
      }
    ]
  },

  {
    path: '/home3',
    name: 'Home',
    component: Home,
    meta: {
      title: '医技处置',
      hasChildren: true
    },
    children:[
      {
        path: '/doctorDeal',
        name: 'DoctorDeal',
        component: DoctorDeal,
        meta: {
          title: '医技处置',
        }
      }
    ]
  },

  {
    path: '/home4',
    name: 'Home',
    component: Home,
    meta: {
      title: '药房管理',
      hasChildren: true
    },
    children:[
      {
        path: '/drugstoreManage',
        name: 'DrugstoreManage',
        component: DrugstoreManage,
        meta: {
          title: '药房管理',
        }
      }
    ]
  },

  {
    path: '/home5',
    name: 'Home',
    component: Home,
    meta: {
      title: '财务管理',
      hasChildren: true
    },
    children:[
      {
        path: '/financialManage',
        name: 'FinancialManage',
        component: FinancialManage,
        meta: {
          title: '财务管理',
        }
      }
    ]
  },



  {
    path: '/home6',
    name: 'Home',
    component: Home,
    meta:{
      title:'系统信息',
      hasChildren:true

    },
    children:[
      {
        path:'/constantManage',
        name:'ConstantManage',
        component:ConstantManage,
        meta:{
          title:'常数类别管理'
        },

      },
      {
        path:'/officeManage',
        name:'OfficeManage',
        component:OfficeManage,
        meta:{
          title:'科室管理'

        },

      },
      {
        path:'/userManage',
        name:'UserManage',
        component:UserManage,
        meta:{
          title:'用户管理'

        },

      },
      {
        path:'/registerRank',
        name:'RegisterRank',
        component:RegisterRank,
        meta:{
          title:'挂号级别管理'

        },

      },
      {
        path:'/accountsManage',
        name:'AccountsManage',
        component:AccountsManage,
        meta:{
          title:'结算类别管理'

        },

      },
      {
        path:'/diagnoseManage',
        name:'DiagnoseManage',
        component:DiagnoseManage,
        meta:{
          title:'诊断目录管理'

        },

      },
      {
        path:'/undrugFeeManage',
        name:'UndrugFeeManage',
        component:UndrugFeeManage,
        meta:{
          title:'非药品收费项目管理'

        },

      },
      {
        path:'/doctorDutyManage',
        name:'DoctorDutyManage',
        component:DoctorDutyManage,
        meta:{
          title:'医生排班管理'

        },
      },

    ]


  },


]

const router = new VueRouter({
  routes
})

export default router
